﻿<UserControl x:Class="BadHabit.Factory.Controls.CurrentSprintDisplay"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:props="clr-namespace:BadHabit.Factory.Windows.Properties">
  
    
    <Grid MaxWidth="100" DataContext="{Binding Project[0]}">
        <StackPanel HorizontalAlignment="Center" VerticalAlignment="Center">            
            <TextBlock
                Style="{StaticResource ToolBarBigTextBlock}"
                Text="{Binding CurrentSprint.WorkDayLeft}"/>
            <TextBlock
                Style="{StaticResource ToolBarBigTextBlock}"
                FontSize="12"
                TextWrapping="WrapWithOverflow"
                Text="{x:Static props:Resources.days_left}"/>
            <!--<TextBlock                   
                FontSize="14"
                Style="{StaticResource ToolBarBigTextBlock}"
                Text="{Binding CurrentSprint.SprintNumber, StringFormat='Sprint {0}' }"
                />-->
            <StackPanel.Style>
                <Style>
                    <Setter Property="StackPanel.Visibility" Value="Visible"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding CurrentSprint}" Value="{x:Null}">
                            <Setter Property="StackPanel.Visibility" Value="Collapsed"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>
            </StackPanel.Style>
        </StackPanel>

        <TextBlock                                
                Width="90"
                Foreground="{StaticResource AlertValueBrush}"
                HorizontalAlignment="Center"
                TextWrapping="Wrap"
                
                Text="{x:Static props:Resources.Not_running}">
                <TextBlock.Style>
                <Style TargetType="TextBlock" BasedOn="{StaticResource ToolBarBigTextBlock}">
                    <Setter Property="TextBlock.Visibility" Value="Collapsed"/>
                    <Style.Triggers>
                        <DataTrigger Binding="{Binding CurrentSprint}" Value="{x:Null}">
                            <Setter Property="TextBlock.Visibility" Value="Visible"/>
                        </DataTrigger>
                    </Style.Triggers>
                </Style>    
                </TextBlock.Style>
        </TextBlock>
    </Grid>
    
</UserControl>
